package follow.juc.demo;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;

/**
 * @Author tu zy
 * @Date 2020/12/2 14:02
 * @Version 1.0
 */
public class Case_2 {
    public static void main(String[] args) {
        Runtime runtime = Runtime.getRuntime();
        /*try {
            Process process = runtime.exec("notepad.exe");
            int i = process.waitFor();
            System.out.println(i);
        } catch (IOException e) {
            e.printStackTrace();
        } catch (InterruptedException e) {
            e.printStackTrace();
        }*/

        boolean exists = Files.exists(Paths.get("D:\\资料"));
        try {
            Files.deleteIfExists(Paths.get("D:\\料"));
        } catch (IOException e) {
            e.printStackTrace();
        }
        //System.out.println(exists);
    }
}
